Stop using the -gtk-icon-theme style property
authorMatthias Clasen <mclasen@redhat.com>
Tue, 21 Apr 2020 12:37:04 +0000 (08:37 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 22 Apr 2020 16:35:22 +0000 (12:35 -0400)
We want to just use the current icon theme, always.

gtk/gtkcssimageicontheme.c
gtk/gtkcsspalettevalue.c
gtk/gtkfilechooserbutton.c
gtk/gtkfilesystem.c
gtk/gtkiconhelper.c
gtk/gtkmountoperation.c
gtk/gtkwindow.c

index c886e2447cf1b8831dfd31fd54d8c01178f807c8..4fed08546b73f12978081d327039ff697d9a187a 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <math.h>
 
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtksettingsprivate.h"
 #include "gtksnapshot.h"
 #include "gtkstyleproviderprivate.h"
@@ -149,7 +148,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage      *image,
 
   copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
   copy->name = g_strdup (icon_theme->name);
-  copy->icon_theme = gtk_css_icon_theme_value_get_icon_theme (style->core->icon_theme);
+  copy->icon_theme = icon_theme->icon_theme;
   copy->scale = gtk_style_provider_get_scale (provider);
   gtk_icon_theme_lookup_symbolic_colors (style, &copy->color, &copy->success, &copy->warning, &copy->error);
 
index 8245be9123afdf91a68b5e823dbc8ac6903f1dcb..a5aab3d61595819f1be3cdc10438b9673e938c93 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "gtkcsspalettevalueprivate.h"
 
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtkcsscolorvalueprivate.h"
 #include "gtkcsscolorvalueprivate.h"
 #include "gtkprivate.h"
index d509b86990e7910e2ad2dfc59618409fc13292e1..b5860d0161976a4eef7216def61ce07d5dfd4613 100644 (file)
@@ -36,7 +36,6 @@
 #include "gtkcellrenderertext.h"
 #include "gtkcellrendererpixbuf.h"
 #include "gtkcombobox.h"
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtkdroptarget.h"
 #include "gtkicontheme.h"
 #include "gtkimage.h"
index 55cf55b1fc22145309ebae5bd4a85d26463e50c6..4e71446d692bcd5fbfc0fbe5258f66c78c2cfdd4 100644 (file)
@@ -27,7 +27,6 @@
 #include <glib/gi18n-lib.h>
 
 #include "gtkfilechooser.h"
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkstylecontextprivate.h"
index 9b68d498311a07238fc573c963797772c7c95464..2bbbcc03549986db753d626cb671e32d6d7f9553 100644 (file)
@@ -24,7 +24,6 @@
 #include <math.h>
 
 #include "gtkcssenumvalueprivate.h"
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtkcssnodeprivate.h"
 #include "gtkcssnumbervalueprivate.h"
 #include "gtkcssstyleprivate.h"
index 8830ba3e6dee19d0c9d7d8d5c8012e0d547d5903..a9626ac35e2d507f446e6a6e73399d46068e8866 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "gtkmountoperationprivate.h"
 #include "gtkbox.h"
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtkdbusgenerated.h"
 #include "gtkentry.h"
 #include "gtkbox.h"
@@ -1206,7 +1205,7 @@ add_pid_to_process_list_store (GtkMountOperation              *mount_operation,
       GtkIconTheme *theme;
       GtkIconPaintable *icon;
 
-      theme = gtk_css_icon_theme_value_get_icon_theme
+      theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (mount_operation->priv->dialog)));
         (_gtk_style_context_peek_property (gtk_widget_get_style_context (GTK_WIDGET (mount_operation->priv->dialog)),
                                            GTK_CSS_PROPERTY_ICON_THEME));
       icon = gtk_icon_theme_lookup_icon (theme,
index c02742e0550fc8f0ec466e5b761ef91be14fa72f..c79f23c15052b66fbf53af82fc17c17817f4c337 100644 (file)
@@ -34,7 +34,6 @@
 #include "gtkbutton.h"
 #include "gtkcheckbutton.h"
 #include "gtkcsscornervalueprivate.h"
-#include "gtkcssiconthemevalueprivate.h"
 #include "gtkcsscolorvalueprivate.h"
 #include "gtkcssshadowvalueprivate.h"
 #include "gtkcssstylepropertyprivate.h"
@@ -3363,17 +3362,13 @@ icon_list_from_theme (GtkWindow   *window,
 {
   GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
   GList *list;
-  GtkStyleContext *context;
-  GtkCssValue *value;
   GtkIconTheme *icon_theme;
   GtkIconPaintable *info;
   GdkTexture *texture;
   gint *sizes;
   gint i;
 
-  context = gtk_widget_get_style_context (GTK_WIDGET (window));
-  value = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_ICON_THEME);
-  icon_theme = gtk_css_icon_theme_value_get_icon_theme (value);
+  icon_theme = gtk_icon_theme_get_for_display (priv->display);
 
   sizes = gtk_icon_theme_get_icon_sizes (icon_theme, name);